package com.zzxy.springmvc.controller;
import com.zzxy.springmvc.Po.Student;
import com.zzxy.springmvc.Po.StudentExt;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/stu")
public class StudentController {
    public String register(){
        @RequestMapping("/register")
        public String register(){
        return "/user/register";

    }
        @RequestMapping("/inster")
    public  @ResponeBody Student insert(@RequestBody Student student){
          student.setPassword(student.getPassword()+":qwe");
          student.setUsername(student.getUsername()+":asd");
          return  student;
        }
    }
    @RequestMapping("/addStu1")
            public String addStu(Student,Student){
            System.out.println(student);

            return "/user/userList";
        }
        @RequestMapping("/addStu2")
        public String addStu(StudentExt,ext){
            System.out.println(ext);

            return "/user/userList";
        }
}
